package com.cloudfast.config;

import com.cloudfast.config.property.c.LocalProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * spring安全管理
 *
 * @author liuyw
 * @date 2022年8月29日
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    LocalProperty localProperty;

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/images/**").addResourceLocations("file:" + localProperty.getFileHome() + "/");
    }
}